home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_teo_lightshaft.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  102 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEO_IrisDoor.cog
  4. #
  5. # Door Script
  6. #
  7. # [SXC]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14.     message     startup
  15.     message     arrived
  16.     
  17.     thing       shaft1
  18.     thing       shaft2
  19.     thing       shaft3
  20.     thing       shaft4
  21.     thing       shaft5
  22.     
  23.     thing       irisdoor1     linkid=4
  24.     thing       irisdoor2     linkid=4
  25.     thing       irisdoor3     linkid=4
  26.     
  27.     int         shaftlit1=0   local
  28.     int         shaftlit2=0   local
  29.     int         shaftlit3=0   local
  30.     int         count=0       local
  31.     
  32. end
  33.  
  34. # ========================================================================================
  35.  
  36. code
  37.  
  38. # ........................................................................................
  39. startup:
  40.     for (count=0; count<=4; count=count+1)
  41.     {
  42.         ThingFadeAnim(shaft1[count], 1, 0, 0.1, 0);
  43.         SetThingLight(shaft1[count], '0 0 0', 0, 0);
  44.     }
  45.     return;
  46.  
  47. # ........................................................................................
  48. arrived:
  49.  
  50.     if ((GetSenderID() == 4) && 
  51.         (GetCurFrame(irisdoor1) == 1) && 
  52.         (shaftlit1 == 0))
  53.     {
  54.         ThingFadeAnim(shaft1, 0, 1, 0.5, 0);
  55.         SetThingLight(shaft1, '1.0 1.0 1.0', 1.5, 0.5);
  56.         shaftlit1 = 1;
  57.         //print("lighting shaft 1");
  58.     }
  59.     
  60.     
  61.     if ((GetSenderID() == 4) && 
  62.         (GetCurFrame(irisdoor2) == 1) && 
  63.         (shaftlit2 == 0) && 
  64.         (shaftlit1 == 1))
  65.     {
  66.         ThingFadeAnim(shaft2, 0, 1, 0.5, 0);
  67.         SetThingLight(shaft2, '1.0 1.0 1.0', 1.5, 0.5);
  68.         shaftlit2 = 1;
  69.         //print("lighting shaft 2");
  70.     }
  71.     
  72.     
  73.     if ((GetSenderID() == 4) && 
  74.         (GetCurFrame(irisdoor3) == 1) && 
  75.         (shaftlit3 == 0) && 
  76.         (shaftlit2 == 1) && 
  77.         (shaftlit1 == 1))
  78.     {
  79.         //print("lighting shafts 3-5");
  80.         ThingFadeAnim(shaft3, 0, 1, 0.5, 0);
  81.         SetThingLight(shaft3, '1.0 1.0 1.0', 1.5, 0.5);
  82.         ThingFadeAnim(shaft4, 0, 1, 0.5, 0);
  83.         SetThingLight(shaft4, '1.0 1.0 1.0', 1.5, 0.5);
  84.         ThingFadeAnim(shaft5, 0, 1, 0.5, 0);
  85.         SetThingLight(shaft5, '1.0 1.0 1.0', 1.5, 0.5);
  86.         shaftlit3 = 1;
  87.     }
  88.     
  89.     if ((GetSenderRef() == irisdoor1) && (GetCurFrame(irisdoor1) == 0) && (shaftlit1 == 1))
  90.     {
  91.         for (count=0; count<=4; count=count+1)
  92.         {
  93.             ThingFadeAnim(shaft1[count], 1, 0, 0.1, 0);
  94.             SetThingLight(shaft1[count], '0 0 0', 0, 0.5);
  95.         }
  96.     }
  97.     
  98.     return;    
  99.     
  100. end
  101.  
  102.